#include "threadPool.h"   
int func_ls(char * ant,numStack_t * stack,MYSQL * mysql)
{
    strcat(ant,".. .");
    int top=topStack(stack);
    printf("top is %d\n",top);
    char sql[100]={0};
    sprintf(sql,"select * from file_excel where parent_id = %d and is_deleted = 0  ;",top);
    int ret=mysql_query(mysql,sql);
    if(ret!=0)
    {
        printf("Error: %s\n", mysql_error(mysql));
        return -1;
    }
    MYSQL_RES * result = mysql_store_result(mysql);
    MYSQL_ROW row;
    while((row = mysql_fetch_row(result)) != NULL){
        strcat(ant," ");
        strcat(ant,row[1]);             
    }
    mysql_free_result(result);
    return 0;
}

